//
//  graphCalc.h
//  ElektroM
//
//  Created by Michael on 16.11.09.
//  Copyright 2009 Artgruppe inc. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
 *  _aiNodes should contain an array of array of Dictionaries (link and weight)
 *  to hold all the links of objects;
 *
 *  _aiLineNumbers contains line number of each node;
 */

@interface graphCalc : NSObject {

    int* 		_weights;
    int* 		_parents;

    int 		_nStart;

    NSArray* 		_aiNodes;
    NSArray* 		_aiLineNumbers;
}

-(void) init;
-(void) setNodes: (NSArray*) aiNodes;
-(void) setLineNumbers: (NSArray*) aiLineNumbers;
-(int) getParent: (int)node;
-(int) getWeight: (int)node;
-(void) setStart: (int)nStart;
-(void) relax: (int)nRelaxing withNode:(int)nFrom withWeight:(int)nWeight;
-(void) applyCyclon;
-(void) printWeights;
-(void) cleanUp;
-(void) applyCyclonC: (int*)allowedLineNumbers withAllowedCount:(int)nAllowedCount;
@end
